RequestPdfDocumentPasswordCallback

The callback is invoked when the frame requests the password for an encrypted PDF document.

Use the password to provide the password for the encrypted PDF document.

Use the showPasswordDialog method to invoke the default PDF viewer password dialog.

Use the cancel method to cancel the request.


browser.set(RequestPdfDocumentPasswordCallback.class, (params, tell) -> {
    if (params.url().endsWith("my-protected-file.pdf")) {
        tell.password("H3NXrfF23");
    }
});

Since

7.27

Inheritors

Types

Link copied to clipboard
An action providing a response to the RequestPdfDocumentPasswordCallback.
Link copied to clipboard
interface Params
The parameters of the RequestPdfDocumentPasswordCallback.

Functions

Link copied to clipboard
abstract fun on(params: P, tell: R)
Invoked when the callback needs a response for the given callback parameters.